package com.zh.custom.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotBlank;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.io.Serial;

/**
 * 客户信息表Entity
 * @author 690378361@163.com
 * @version 2025-08-31
 */
@Table(name="t_customer", alias="a", label="客户信息表信息", columns={
		@Column(name="id", attrName="tid", label="主键", isPK=true),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false, isUpdateForce=true),
		@Column(name="cus_name", attrName="cusName", label="客户姓名", queryType=QueryType.LIKE),
		@Column(name="cus_age", attrName="cusAge", label="客户年龄"),
		@Column(name="cus_sex", attrName="cusSex", label="客户性别"),
		@Column(name="cus_phone", attrName="cusPhone", label="客户联系方式"),
		@Column(name="cus_address", attrName="cusAddress", label="客户住址"),
		@Column(name="cus_address_detail", attrName="cusAddressDetail", label="详细地址"),
		@Column(name="cus_id_card", attrName="cusIdCard", label="客户身份证号"),
		@Column(name="del_flag", attrName="delFlag", label="删除标识 0-未删除，1-已删除"),
		@Column(name="stop_flag", attrName="stopFlag", label="停用标识 0-未停用，1-停用"),
	}, orderBy="a.update_date DESC"
)
public class Tcustomer extends DataEntity<Tcustomer> {
	
	@Serial
	private static final long serialVersionUID = 1L;
	private Integer tid;		// 主键
	private String cusName;		// 客户姓名
	private String cusAge;		// 客户年龄
	private String cusSex;		// 客户性别
	private String cusPhone;		// 客户联系方式
	private String cusAddress;		// 客户住址
	private String cusAddressDetail;		// 详细地址
	private String cusIdCard;		// 客户身份证号
	private String delFlag;		// 删除标识 0-未删除，1-已删除
	private String stopFlag;		// 停用标识 0-未停用，1-停用

	public Tcustomer() {
		this(null);
	}
	
	public Tcustomer(String id){
		super(id);
	}
	
	@JsonSerialize(using = ToStringSerializer.class)
	public Integer getTid() {
		return tid;
	}

	public void setTid(Integer tid) {
		this.tid = tid;
	}
	
	@Size(min=0, max=64, message="客户姓名长度不能超过 64 个字符")
	public String getCusName() {
		return cusName;
	}

	public void setCusName(String cusName) {
		this.cusName = cusName;
	}
	
	@Size(min=0, max=16, message="客户年龄长度不能超过 16 个字符")
	public String getCusAge() {
		return cusAge;
	}

	public void setCusAge(String cusAge) {
		this.cusAge = cusAge;
	}
	
	@Size(min=0, max=5, message="客户性别长度不能超过 5 个字符")
	public String getCusSex() {
		return cusSex;
	}

	public void setCusSex(String cusSex) {
		this.cusSex = cusSex;
	}
	
	@Size(min=0, max=24, message="客户联系方式长度不能超过 24 个字符")
	public String getCusPhone() {
		return cusPhone;
	}

	public void setCusPhone(String cusPhone) {
		this.cusPhone = cusPhone;
	}
	
	@Size(min=0, max=32, message="客户住址长度不能超过 32 个字符")
	public String getCusAddress() {
		return cusAddress;
	}

	public void setCusAddress(String cusAddress) {
		this.cusAddress = cusAddress;
	}
	
	@Size(min=0, max=256, message="详细地址长度不能超过 256 个字符")
	public String getCusAddressDetail() {
		return cusAddressDetail;
	}

	public void setCusAddressDetail(String cusAddressDetail) {
		this.cusAddressDetail = cusAddressDetail;
	}
	
	@Size(min=0, max=18, message="客户身份证号长度不能超过 18 个字符")
	public String getCusIdCard() {
		return cusIdCard;
	}

	public void setCusIdCard(String cusIdCard) {
		this.cusIdCard = cusIdCard;
	}
	
	@Size(min=0, max=2, message="删除标识 0-未删除，1-已删除长度不能超过 2 个字符")
	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
	
	@Size(min=0, max=2, message="停用标识 0-未停用，1-停用长度不能超过 2 个字符")
	public String getStopFlag() {
		return stopFlag;
	}

	public void setStopFlag(String stopFlag) {
		this.stopFlag = stopFlag;
	}
	
}